<template>
	<view class="custom-group ss-flex flex-column align-end ss-p-x-16 ss-p-y-20">
		<view class="custom-group-title">特邀您入群</view>
		<view class="custom-group-tips ss-m-t-8">{{message.payload.custom.describe}}</view>
		<view class="custom-group-btn ss-m-t-10 ss-p-x-24" @click="jumpCustom(message)">立即加入{{message.payload.custom.name}}</view>
	</view>
</template>

<script setup>
	import sheep from '@/sheep';
	import {cdn,udid} from '@/im/config/index.js'
	
	const props = defineProps({
		message: {
			type: Object,
			default: {}
		}
	})
	
	const jumpCustom = (msg) => {
		if (udid === msg.payload.custom.tag) {
			uni.navigateTo({
				url:msg.payload.custom.linkUrl
			})
		} else {
			uni.showToast({
				title: '请前往指定平台查看详情!',
				icon: 'none',
				duration: 2000
			});
		}
	}
</script>

<style scoped lang="scss">
	view {
		box-sizing: border-box;
	}
	
	.custom-group {
		width: 452rpx;
		background: #FFFFFF;
		border-radius: 12rpx;
	
		.custom-group-title {
			width: 100%;
			font-weight: 500;
			font-size: 28rpx;
			color: #333333;
			text-align: left;
		}
	
		.custom-group-tips {
			font-weight: 400;
			font-size: 24rpx;
			color: #A3A3A3;
		}
	
		.custom-group-btn {
			display: inline-block;
			height: 54rpx;
			background: linear-gradient(257deg, #F15D00 0%, #F9CEA6 100%, #F9CEA6 100%);
			border-radius: 40rpx;
			font-weight: 350;
			font-size: 24rpx;
			color: #FFFFFF;
			line-height: 54rpx;
		}
	}
</style>